how to calculate units of production